home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / sys-include / powerup / ppcpragmas / asl_pragmas.h < prev    next >
C/C++ Source or Header  |  2000-03-13  |  4KB  |  148 lines

  1. /* Automatically generated header! Do not edit! */
  2.  
  3. #ifndef _PPCPRAGMA_ASL_H
  4. #define _PPCPRAGMA_ASL_H
  5. #ifdef __GNUC__
  6. #ifndef _PPCINLINE__ASL_H
  7. #include <powerup/ppcinline/asl.h>
  8. #endif
  9. #else
  10.  
  11. #ifndef POWERUP_PPCLIB_INTERFACE_H
  12. #include <powerup/ppclib/interface.h>
  13. #endif
  14.  
  15. #ifndef POWERUP_GCCLIB_PROTOS_H
  16. #include <powerup/gcclib/powerup_protos.h>
  17. #endif
  18.  
  19. #ifndef NO_PPCINLINE_STDARG
  20. #define NO_PPCINLINE_STDARG
  21. #endif/* SAS C PPC inlines */
  22.  
  23. #ifndef ASL_BASE_NAME
  24. #define ASL_BASE_NAME AslBase
  25. #endif /* !ASL_BASE_NAME */
  26.  
  27. #define    AllocAslRequest(reqType, tagList)    _AllocAslRequest(ASL_BASE_NAME, reqType, tagList)
  28.  
  29. static __inline APTR
  30. _AllocAslRequest(void *AslBase, unsigned long reqType, struct TagItem *tagList)
  31. {
  32. struct Caos    MyCaos;
  33.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  34. //    MyCaos.M68kStart    =    NULL;
  35. //    MyCaos.M68kSize        =    0;
  36.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  37. //    MyCaos.PPCStart        =    NULL;
  38. //    MyCaos.PPCSize        =    0;
  39.     MyCaos.d0        =(ULONG) reqType;
  40.     MyCaos.a0        =(ULONG) tagList;
  41.     MyCaos.caos_Un.Offset    =    (-48);
  42.     MyCaos.a6        =(ULONG) AslBase;    
  43.     return((APTR)PPCCallOS(&MyCaos));
  44. }
  45.  
  46. #ifndef NO_PPCINLINE_STDARG
  47. #define AllocAslRequestTags(a0, tags...) \
  48.     ({ULONG _tags[] = { tags }; AllocAslRequest((a0), (struct TagItem *)_tags);})
  49. #endif /* !NO_PPCINLINE_STDARG */
  50.  
  51. #define    AllocFileRequest()    _AllocFileRequest(ASL_BASE_NAME)
  52.  
  53. static __inline struct FileRequester *
  54. _AllocFileRequest(void *AslBase)
  55. {
  56. struct Caos    MyCaos;
  57.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  58. //    MyCaos.M68kStart    =    NULL;
  59. //    MyCaos.M68kSize        =    0;
  60.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  61. //    MyCaos.PPCStart        =    NULL;
  62. //    MyCaos.PPCSize        =    0;
  63.     MyCaos.caos_Un.Offset    =    (-30);
  64.     MyCaos.a6        =(ULONG) AslBase;    
  65.     return((struct FileRequester *)PPCCallOS(&MyCaos));
  66. }
  67.  
  68. #define    AslRequest(requester, tagList)    _AslRequest(ASL_BASE_NAME, requester, tagList)
  69.  
  70. static __inline BOOL
  71. _AslRequest(void *AslBase, APTR requester, struct TagItem *tagList)
  72. {
  73. struct Caos    MyCaos;
  74.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  75. //    MyCaos.M68kStart    =    NULL;
  76. //    MyCaos.M68kSize        =    0;
  77.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  78. //    MyCaos.PPCStart        =    NULL;
  79. //    MyCaos.PPCSize        =    0;
  80.     MyCaos.a0        =(ULONG) requester;
  81.     MyCaos.a1        =(ULONG) tagList;
  82.     MyCaos.caos_Un.Offset    =    (-60);
  83.     MyCaos.a6        =(ULONG) AslBase;    
  84.     return((BOOL)PPCCallOS(&MyCaos));
  85. }
  86.  
  87. #ifndef NO_PPCINLINE_STDARG
  88. #define AslRequestTags(a0, tags...) \
  89.     ({ULONG _tags[] = { tags }; AslRequest((a0), (struct TagItem *)_tags);})
  90. #endif /* !NO_PPCINLINE_STDARG */
  91.  
  92. #define    FreeAslRequest(requester)    _FreeAslRequest(ASL_BASE_NAME, requester)
  93.  
  94. static __inline void
  95. _FreeAslRequest(void *AslBase, APTR requester)
  96. {
  97. struct Caos    MyCaos;
  98.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  99. //    MyCaos.M68kStart    =    NULL;
  100. //    MyCaos.M68kSize        =    0;
  101.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  102. //    MyCaos.PPCStart        =    NULL;
  103. //    MyCaos.PPCSize        =    0;
  104.     MyCaos.a0        =(ULONG) requester;
  105.     MyCaos.caos_Un.Offset    =    (-54);
  106.     MyCaos.a6        =(ULONG) AslBase;    
  107.     PPCCallOS(&MyCaos);
  108. }
  109.  
  110. #define    FreeFileRequest(fileReq)    _FreeFileRequest(ASL_BASE_NAME, fileReq)
  111.  
  112. static __inline void
  113. _FreeFileRequest(void *AslBase, struct FileRequester *fileReq)
  114. {
  115. struct Caos    MyCaos;
  116.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  117. //    MyCaos.M68kStart    =    NULL;
  118. //    MyCaos.M68kSize        =    0;
  119.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  120. //    MyCaos.PPCStart        =    NULL;
  121. //    MyCaos.PPCSize        =    0;
  122.     MyCaos.a0        =(ULONG) fileReq;
  123.     MyCaos.caos_Un.Offset    =    (-36);
  124.     MyCaos.a6        =(ULONG) AslBase;    
  125.     PPCCallOS(&MyCaos);
  126. }
  127.  
  128. #define    RequestFile(fileReq)    _RequestFile(ASL_BASE_NAME, fileReq)
  129.  
  130. static __inline BOOL
  131. _RequestFile(void *AslBase, struct FileRequester *fileReq)
  132. {
  133. struct Caos    MyCaos;
  134.     MyCaos.M68kCacheMode    =    IF_CACHEFLUSHALL;
  135. //    MyCaos.M68kStart    =    NULL;
  136. //    MyCaos.M68kSize        =    0;
  137.     MyCaos.PPCCacheMode    =    IF_CACHEFLUSHALL;
  138. //    MyCaos.PPCStart        =    NULL;
  139. //    MyCaos.PPCSize        =    0;
  140.     MyCaos.a0        =(ULONG) fileReq;
  141.     MyCaos.caos_Un.Offset    =    (-42);
  142.     MyCaos.a6        =(ULONG) AslBase;    
  143.     return((BOOL)PPCCallOS(&MyCaos));
  144. }
  145.  
  146. #endif /* SASC Pragmas */
  147. #endif /* !_PPCPRAGMA_ASL_H */
  148.